<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>培训考核与反馈</title>
    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../static/css/admin.css" media="all">
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card layui-form">
        <div class="layui-card-header" style="border-radius: 0;border-top: 4px solid #d2d2d2;">
        </div>
        <div class="layui-form layui-card-body layuiadmin-card-header-auto" lay-filter="layuiadmin-form-useradmin"
             id="layuiadmin-form-useradmin">
            <!--培训名称-->
            <div class="layui-form-item">
                <label class="layui-form-label required">培训名称：</label>
                <div class="layui-input-inline" style="width: 820px">
                    <input type="text" name="training_name" lay-verify="required" autocomplete="off" class="layui-input" readonly>
                </div>
            </div>
            <!--培训讲师-->
            <div class="layui-form-item layui-inline">
                <label class="layui-form-label required">培训讲师：</label>
                <div class="layui-input-inline" >
                    <input type="text" name="teacher" lay-verify="required" autocomplete="off" class="layui-input" readonly>
                </div>
            </div>
            <!--培训时间-->
            <div class="layui-form-item layui-inline">
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label required">培训时间：</label>
                    <div class="layui-form-item layui-inline" id="test6">
                        <div class="layui-input-inline" readonly>
                            <input type="text" name="start_time" autocomplete="off" id="test-startDate-1" class="layui-input"
                                   placeholder="开始日期" lay-verify="required" readonly>
                        </div>
                        <div class="layui-form-mid required">至</div>
                        <div class="layui-input-inline" readonly>
                            <input type="text" name="end_time" autocomplete="off" id="test-endDate-1" class="layui-input"
                                   placeholder="结束日期" lay-verify="required" readonly>
                        </div>
                    </div>
                </div>
            </div>
            <!--培训目的-->
            <div class="layui-form-item">
                <label class="layui-form-label required">培训目的：</label>
                <div class="layui-input-block" style="width: 820px">
                    <textarea placeholder="请输入内容" name="purpose" class="layui-textarea" lay-verify="required" readonly></textarea>
                </div>
            </div>
            <!--参训人员-->
            <div class="layui-form-item">
                <label class="layui-form-label required">参训人员：</label>
                <div class="layui-input-block" style="width: 820px">
                    <textarea placeholder="请输入内容" name="people" class="layui-textarea" lay-verify="required" readonly></textarea>
                </div>
            </div>
            <!--培训简介-->
            <div class="layui-form-item">
                <label class="layui-form-label required">培训简介：</label>
                <div class="layui-input-block" style="width: 820px">
                    <textarea placeholder="请输入内容" name="profile" class="layui-textarea" lay-verify="required" readonly></textarea>
                </div>
            </div>
            <!--培训资料-->
            <div class="layui-form-item">
                <label class="layui-form-label">培训资料：</label>
                <div class="layui-input-block" style="width: 820px">
                    <textarea placeholder="请输入内容" name="training_url" class="layui-textarea" readonly></textarea>
                </div>
            </div>

<!--            <div class="layui-btn-container">-->
<!--                <input id="training_url" name="training_url" hidden="hidden" readonly>-->
<!--            </div>-->
            <!--审核意见-->
            <div class="layui-form-item">
                <label class="layui-form-label">审核意见：</label>
                <div class="layui-input-block" style="width: 820px">
                    <textarea placeholder="请输入内容" name="audit_advice" class="layui-textarea" lay-verify="required" readonly></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="lay-input-block" style="margin-left: 10px">
                    <p style="margin-left: 28px;color: #669933">————————————培训反馈——————————————————————————————————————————————</p>
                </div>
            </div>
            <!--培训反馈-->
            <div class="layui-form-item">
                <label  class="layui-form-label">培训反馈:</label>
                <div class="layui-inline">
                    <div class="layui-block">
                        <select name="feedback" id="train_select" >
                            <option value=""selected>请选择</option>
                            <option value="优">优</option>
                            <option value="良">良</option>
                            <option value="差">差</option>
                        </select>
                    </div>
                </div>
            </div>
            <!--培训总结-->
            <div class="layui-form-item">
                <label class="layui-form-label required">培训总结:</label>
                <div class="layui-input-inline">
                    <!--    <input type="textarea" style="width: 810px;height: 100px; padding-top: 0;
                            line-height: 1px;" name="train_introduction" lay-verify="required" placeholder="请输入培训简介" autocomplete="off" class="layui-input"/>-->

                    <textarea name="summary"style="width: 820px;"  placeholder="请输入培训总结" class="layui-textarea"></textarea>
                </div>
            </div>
            <!--考核结果-->
            <div class="layui-form-item">
                <label class="layui-form-label required">考核结果:</label>
                <div class="layui-input-inline">
                    <!--    <input type="textarea" style="width: 810px;height: 100px; padding-top: 0;
                            line-height: 1px;" name="train_introduction" lay-verify="required" placeholder="请输入培训简介" autocomplete="off" class="layui-input"/>-->

                    <textarea name="result"style="width: 820px;"  placeholder="请输入考核结果" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-form-text layui-hide">
                <label class="layui-form-label">id</label>
                <div class="layui-input-block" style="width: 820px">
                    <textarea placeholder="id" name="training_id" class="layui-textarea" lay-verify="required"></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <input type="button" lay-submit lay-filter="LAY-user-front-submit" id="LAY-user-front-submit"
                       value="确认">
            </div>
        </div>
    </div>
</div>
<!--<script src="js/jquery-2.0.3.min.js"></script>-->
<script src="../../static/layui/layui.js"></script>
<script type="text/javascript">
    // 日期格式转换函数
    function formatDate(str) {
        if (str != null) {
            var now = new Date(str);
            var year = now.getFullYear();  //取得4位数的年份
            var month = now.getMonth() + 1;  //取得日期中的月份，其中0表示1月，11表示12月
            var date = now.getDate();      //返回日期月份中的天数（1到31）
            return year + "-" + month + "-" + date;
        }
        return "";
    }
</script>
<script type="text/javascript">
    layui.config({
        base: '../../static/layui/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['layer', 'table', 'form', 'element', 'util', 'laydate','index','layedit','upload'], function () {
        var $ = layui.$
            , form = layui.form
            , layer = layui.layer
            , table = layui.table
            , element = layui.element
            , util = layui.util
            , layedit = layui.layedit
            , laydate = layui.laydate
            , upload = layui.upload;
        //常规用法
        laydate.render({
            elem: '#hiredate'
        });
        //===============================文件上传
        var uploadInst = upload.render({
            elem: '#test8',//-----------
            // url: '/training/uploadFileTraining', // 实际使用时改成您自己的上传接口即可。
            multiple:true,
            accept:'file',
            auto: false,//-----------
            bindAction: '#test9',
            done: function(res){
                layer.msg('上传成功');
                console.log(res)
                $('#training_url').val(res.urI)
                //
                $('#ID-upload-demo-text').html(''); // 置空上传失败的状态
            },
        });
        /*时间选择*/
        laydate.render({
            elem: '#test6'
            //设置开始日期、日期日期的 input 选择器
            //数组格式为 2.6.6 开始新增，之前版本直接配置 true 或任意分割字符即可
            , range: ['#test-startDate-1', '#test-endDate-1']
        });
    });
</script>
</body>
</html>